<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{$word}搜索 - 讯搜</title>
    <link rel="stylesheet" href="/static/css/layui.css">
    <link rel="stylesheet" href="/static/css/list.css">
</head>
<body>
<div class="layui-container">
    <div class="layui-row">
        <form class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="text" name="word" id="word" value="{$word}" required lay-verify="required"
                           placeholder="请输入标题"
                           autocomplete="off" class="layui-input">
                    <input type="submit" id="btn" value="提交" class="layui-btn layui-btn-normal">
                </div>
            </div>
        </form>
        <hr class="layui-bg-red">
        <div class="layui-card">
            <div class="layui-card-header">相关搜索</div>
            <div class="layui-card-body">
                <div class="layui-btn-container">
                    {volist name='hot' id='h'}
                    <a href="{$Think.config.app_host}/search-{$h}.html" class="layui-btn" title="{$h}">{$h}</a>
                    {/volist}
                </div>
            </div>
        </div>

        <hr class="layui-bg-red">
        <div class="layui-card">
            <div class="layui-card-header">搜索结果：共{$count}条</div>
            <div class="layui-card-body">
                {volist name='data' id='v'}
                <div class="list-info">
                    <li class="ym-exhibition-l-li">
                        <img src="https://img.immiknow.com{$v.litpic|default='/static/image/index-2.jpg'}"
                             alt="{$v.title|raw|strip_tags}" title="{$v.title|raw|strip_tags}"
                             class="l ym-exhibition-l-li-img"
                             style="display: block;">
                        <p class="ym-exhibition-l-li-title">
                            <a href="https://www.immiknow.com{$v.true_url}" title="{$v.title|raw|strip_tags}"
                               target="_blank">{$v.title|raw}</a>
                        </p>
                        <p class="ym-exhibition-l-li-p">{$v.desc}</p>
                        <div class="ym-exhibition-l-li-look">
                            <i class="iconfont icon-shijian ym-exhibition-l-li-look-time"> {$v.addtime|date='Y-m-d
                                H:i:s'}</i>
                            <i class="r iconfont icon-zan ym-exhibition-l-li-look-time"> 浏览{$v.views}</i>
                            <i class="r iconfont icon-yuedu ym-exhibition-l-li-look-eye ym-exhibition-l-li-look-time">
                                点赞{$v.likenum}</i>
                        </div>
                    </li>
                </div>
                {/volist}
                <hr class="layui-bg-red">
                <div id="page">
                    {$page|raw}
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/layui.js"></script>
<script>
    layui.use(['layer', 'jquery'], function () {
        var layer = layui.layer, $ = layui.jquery;
        $("#btn").click(function () {
            var word = $("#word").val();
            if (!word || word.length < 1) {
                layer.msg('请输入搜索词');
                return false;
            } else {
                open('/search-' + word + '.html');
            }
            return false;
        })
    });
</script>
</body>
</html>